﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.SqlClient;
using System.Data;

/// <summary>
/// Summary description for func_chuyenlop
/// </summary>
public class func_chuyenlop
{
	public func_chuyenlop()
	{
		//
		// TODO: Add constructor logic here
		//
	}
    #region HOCLOP Update malop
    public string HOCLOP_Update_MALOP( string F_MAHV, string F_MALOP, string F_MALOP_TO)
    {
        DatabaseConnect connect = new DatabaseConnect();

        object[] values = { F_MAHV, F_MALOP, F_MALOP_TO };
        string[] parameters = { "@F_MAHV", "@F_MALOP", "@F_MALOP_TO" };
        // Tham so
        SqlParameter[] para = new SqlParameter[parameters.Length];
        // Gan gia tri tham so
        for (int i = 0; i < parameters.Length; i++)
        {
            para[i] = new SqlParameter(parameters[i], values[i]);

        }
        try
        {
            connect.ExecuteQuery("HOCLOP_Update", para);
            return "OK";
        }
        catch
        {
            return "ERR";
        }
    }
    #endregion

    
}